sp_msforeachdb 'use ? if ''?'' not in (''admin'',''master'',''model'',''tempdb'',''msdb'') begin select db_name() select distinct object_name(c.id) + ''.'' + c.name + '' ('' + spt.type_name + '')'' from dbo.syscolumns c inner join master.dbo.spt_datatype_info spt on c.xtype = spt.ss_dtype where xtype in (34,35,99) and objectproperty(c.id,''IsUserTable'') = 1 and c.id <> object_id(''dbo.dtproperties'') and object_name(c.id) not like ''_trace%'' and COLUMNPROPERTY (c.id, c.name, ''AllowsNull'') = 1 order by object_name(c.id) + ''.'' + c.name + '' ('' + spt.type_name + '')'' end' --select * from master..spt_datatype_info